package com.newtouch.bxzs.business.statistics.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.newtouch.bxzs.common.base.model.Organization;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


/**
 * 组织机构Mapper类
 *
 * <p>
 * <b>History:</b>
 * <table border="1">
 * <tr>
 * <th>Date</th>
 * <th>Operator</th>
 * <th>Memo</th>
 * </tr>
 * <tr>
 * <td>2020/12/21 14:47</td>
 * <td>linhongxi</td>
 * <td>Create</td>
 * </tr>
 * </table>
 *
 * @author linhongxi
 * @version 1.0.0
 * @since 1.0.0
 */
@Mapper
public interface OrganizationMapper extends BaseMapper<Organization> {

	/**
	 * 根据用户机构id查出用户的所有自己机构编码
	 *
	 * @param organizationCode
	 * @return 当前机构及所有子级机构编码
	 */
	@Select(" SELECT getChildLst(#{organizationCode,jdbcType=VARCHAR,mode=INOUT}) ")
	String selectChildOrganizationCodeStr(@Param("organizationCode") String organizationCode);
}
